txt to list python

45

txt to list python -

with open('names.txt', 'r') as f:
    myNames = [line.strip() for line in f]

Comments

Submit
0 Comments